package com.itcast.activiti.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itcast.activiti.domain.Department;
import com.itcast.activiti.domain.UserInfo;
import com.itcast.activiti.entity.ActIdUser;
import com.itcast.activiti.utils.ActivitiPage;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author itcast
 * @since 2020-12-31
 */
public interface IActIdUserService extends IService<ActIdUser> {
    String getUserNameByemail(String email);

    ActivitiPage listActIdUserPage(ActivitiPage activitiPage);

    // 获取用户详情
    UserInfo getUserById(String userId);

    // 获取用户名
    String getUserNameById(String userId);

    // 获取部门负责人
    UserInfo getDepartmentManager(String departmentId);

    // 根据部门获取用户列表
    List<UserInfo> getUsersByDepartmentId(String departmentId);

    // 获取部门
    Department getDepartmentById(String departmentId);

    // 依据当前用户获取部门
    String getDepartmentIdByUserId(String userId);

    // "依据当前用户获取二级部门/依据当前用户获取三级部门
    String getParentDepartmentIdById(String departmentId);

    //根据部门id，获取所有子部门及多级子部门下的部门id
    List<String> getDepartmentsById(String departmentId);

    List<UserInfo> getUsersByActIdProcessId(String actIdProcessId, String startUserId);

    boolean add(ActIdUser actIdUser);

    boolean del(Integer id, String userId);

    void addUserByEmails(Set<String> userEmails);
}
